from pybricks.hubs import EV3Brick
from pybricks.tools import wait


def play(beep_sequence):
    ev3 = EV3Brick()
    for item in beep_sequence:
        if isinstance(item, tuple):
            ev3.speaker.beep(frequency=item[0], duration=item[1])
        else:
            wait(item)
